package com.zzq.service.user;

import com.zzq.dao.user.UserMapper;
import com.zzq.pojo.User;

public class UserServiceImpl implements UserService {
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public User getLoginUser(int userId) {
        return userMapper.getLoginUser(userId);
    }

    @Override
    public User getLoginUserByName(String userName){return userMapper.getLoginUserByName(userName);}

    @Override
    public User login(String userName, String passWord) { return userMapper.login(userName, passWord); }

    @Override
    public int register(String userName, String passWord) {
        return userMapper.register(userName, passWord);
    }

    @Override
    public int changePassword(String userName,String passWord) {
        return userMapper.changePassword(userName,passWord);
    }
}
